{extend name="../../admin/view/main"}

{block name="content"}

<div class="think-box-shadow portal-block-container notselect margin-bottom-20">
    <div class="margin-bottom-15">数据统计</div>
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm6 layui-col-md4">
            <div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#57bdbf,#2f9de2)">
                <div>捐款总金额</div>
                <div>{$total.money|format_price|default=0}</div>
                <div>当前实际捐款总金额</div>
            </div>
            <i class="portal-block-icon layui-icon layui-icon-rmb"></i>
        </div>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#ff7d7d,#fb2c95)">
                <div>捐款人数</div>
                <div>{$total.member|default=0}</div>
                <div>当前实际捐款总人数</div>
            </div>
            <i class="portal-block-icon layui-icon layui-icon-user"></i>
        </div>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="portal-block-item nowrap" style="background:linear-gradient(-113deg,#c543d8,#925cc3)">
                <div>页面显示金额</div>
                <div>{$total.page_money|format_price|default=0}</div>
                <div>当前页面显示捐款总金额</div>
            </div>
            <i class="portal-block-icon layui-icon layui-icon-read"></i>
        </div>
    </div>
</div>
<div class="think-box-shadow">
    {include file='member/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-left nowrap'>ID</th>
            <th class='text-left nowrap'>捐款人姓名</th>
            <th class='text-left nowrap'>联系手机</th>
            <th class='text-center nowrap'>捐款金额</th>
            <th class='text-center nowrap'>显示状态</th>
            <th class='text-left nowrap'>创建时间</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class='text-left nowrap'>{$vo.id}</td>
            <td class='text-left nowrap'>{$vo.realname|default='--'}</td>
            <td class='text-left nowrap'>{$vo.phone|default='--'}</td>
            <td class='text-center nowrap'>{$vo.money|format_price|default=0}</td>
            <td class='text-center nowrap'>{eq name='vo.status' value='0'}<span class="color-red">隐藏</span>{else}<span class="color-green">显示</span>{/eq}
            </td>
            <td class='text-left nowrap'>{$vo.create_at|format_datetime}</td>
            <td class='text-left nowrap'>
                {if $vo.status eq 0 and auth("state")}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确认此人已捐款？" data-action="{:url('state')}"
                   data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">确 认</a>
                {/if}
                {if $vo.status eq 1 and auth("state")}
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确认隐藏此数据？" data-action="{:url('state')}"
                   data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">隐 藏</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
